home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / jaz_clib.arc / INSINT24.C < prev    next >
Text File  |  1989-04-09  |  790b  |  23 lines

  1. /*
  2. ┌────────────────────────────────────────────────────────────────────────────┐
  3. │ Title   : insint24                                 │
  4. │ Purpose : Install a critical Error Handler and set the error code to zero  │
  5. │                                         │
  6. │    Written by Jack Zucker - 75766,1336    301-794-5950             │
  7. └────────────────────────────────────────────────────────────────────────────┘
  8. */
  9. insint24()
  10. {
  11.   extern char far int24error;        /* point to int24error        */
  12.   TVECTOR wvector;
  13.   int int24hnd();
  14.  
  15.   int24error = 0;            /* initialize error to 0 */
  16.  
  17.   wvector.segment = getcs();        /* get code segment address */
  18.   wvector.offset  = (int) int24hnd;    /* get offset of handler */
  19.   cli();                /* disable interrupts */
  20.   jzsetint(0x24,wvector);        /* enable our handler */
  21.   sti();                /* allow interrupts   */
  22. }
  23.